package com.gitee.chessboard.db;

import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import org.apache.ibatis.session.SqlSessionFactory;
import org.jetbrains.annotations.NotNull;

/**
 * @author 敲代码的旺财
 * @date 2021/12/22 16:01
 */
public interface MybatisService {
    static MybatisService getInstance(@NotNull Project project) {
        return ServiceManager.getService(project, MybatisService.class);
    }

    void init();

    void setUrl(String url);

    void setUsername(String username);

    void setPassword(String password);

    SqlSessionFactory getSqlSessionFactory();

    String connectTest();
}
